<?php

namespace app\lucn\controller;

use app\common\controller\Frontend;

use think\Controller;
use think\Request;
use think\Db;
use think\Cache;
//use think\Db;

/**
 * 前端基础控制器
 *
 * @icon fa fa-circle-o
 */
class Base extends Frontend
{
    protected $model = null;

    public function _initialize()
    {
		$this->assign('module',Request::instance()->module());
        parent::_initialize();
    }
	
	/*
	public function _initialize()
    {
		if(Cache::get('cache') == false){
		    $one = Db::name('configvalue')->where('id','config')->find();
			$category = Db::name('category')->select();
			$cache['config'] = json_decode($one['content'],true);
			$cache['category'] = $category;
			Cache::set('cache.config',$cache['config']);
			Cache::set('cache.category',$cache['category']);
		}
		
		$this->assign('cache',Cache::get('cache'));
		$this->assign('color1','#5EB04A');
		$this->assign('color2','#FF9900');
        parent::_initialize();
    }
	
	*/
	
}
